package cn.bugDance.domain.award.service.query;

import cn.bugDance.domain.award.model.entity.UserAwardRecordEntity;
import cn.bugDance.domain.award.repository.IAwardRepository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;


@Service
public class AwardQueryService implements IAwardQueryService{

    @Resource
    private IAwardRepository awardRepository;



    @Override
    public List<UserAwardRecordEntity> queryUserAwardRecords(Integer page, Integer pageSize, String userId) {
        return awardRepository.queryUserAwardRecords(userId);
    }

    @Override
    public List<UserAwardRecordEntity> queryUserAwardRecordsToAll(Long activityId) {
        Date now = new Date();
        return awardRepository.queryUserAwardRecordsToAll(activityId, now);
    }
}
